﻿<div ng-controller="AttendanceStatusController">

    <div class="mt50 clearfix">
        <h3>Attendance status</h3>
        <p>{{texts['lb-calenda']}} </p>
    </div>
    <div id="dsel2" class="w760 mb20" ></div>
    <div class="mb20 clearfix">
        <span class="fleft pd5 mr10">{{texts['lb-store']}}</span>
        <div class="fleft mr10">
            <select class="CBB w100" ng-model="myStore" ng-change="update()">
                <option ng-repeat="store in rowsStoreList" value="{{ store.Name }}">{{store.Name}}</option>
            </select>
        </div>
        <div class="mr10 fleft">
            <input class="w110" type="text" datepicker-popup="{{format}}" ng-model="dfrom" is-open="openedDayForm" max-date="'2020-06-22'" datepicker-options="dateOptions" ng-required="true" close-text="Close" />
            <button type="button" class="btn colorBlack btn-default" ng-click="openDayFrom($event)"><i class="glyphicon glyphicon-calendar"></i></button>
            ~
            <input class="w110" type="text" datepicker-popup="{{format}}" ng-model="dto" is-open="openedDayTo" max-date="'2020-06-22'" datepicker-options="dateOptions" ng-required="true" close-text="Close" />
            <button type="button" class="btn colorBlack btn-default" ng-click="openDayTo($event)"><i class="glyphicon glyphicon-calendar"></i></button>

        </div>
        <div class="fright mr30">
            <button class="w110" ng-click="changeDate()">{{texts['btn-change-date']}}</button>
            <a id="expCsv"  ng-click="ExpCSV()"><button class="w110" type="button">{{texts['btn-export-csv']}}</button></a>
        </div>
    </div>

    <div class="clearfix">
        <table class="tableKind-01 table-AttendanceStatus w760">
            <tr>
                <th>{{texts['lb-staff-name']}}</th>
                <th>{{texts['lb-staff-id']}}</th>
                <th>{{texts['lb-staff-type']}}</th>
                <th>{{texts['lb-check-in']}}</th>
                <th>{{texts['lb-check-out']}}</th>
                <th>{{texts['lb-total-work']}}</th>
                <th>{{texts['lb-total-break']}}</th>
                <th>{{texts['lb-total-go-out']}}t</th>
            </tr>
            <tr ng-repeat="row in rowsAtdStatus | filter : myStore">
                <td><a ng-click="selectedEdit(row.Id)">{{row.Name}}</a></td>
                <td>{{row.Id}}</td>
                <td>{{row.ContractType == 1 ?"Staff":row.ContractType == 2?"Contract Staff":row.ContractType == 3 ?" Part staff":"Part Time staff"}}</td>
                <td>{{row.checkIn}}</td>
                <td>{{row.checkOut}}</td>
                <td>{{row.TotalWork}}</td>
                <td>{{row.TotalBeark}}</td>
                <td>{{row.TotalGoOut}}</td>
            </tr>
        </table>
    </div>

</div>
